<link rel="stylesheet" href="ccay/example/demo.css" type="text/css" />
<script type="text/javascript" src="ccay/example/functionDemo/mailTemplet/mailTempletDemo.js" />
<form id="emailForm">
<div align="left">
	<ul>
	<span>你输入要测试的邮箱</span>
	<input type="text" name="testEmail" style="width:380px"/>
	</ul>
	<div class="ccay-operate">
        <span id="btnSave" class="ccay-button" onclick="Ccay.example.mailTemplet.sendMail()">
	 		<a class="ccay-icon mail"></a>
	 		<label class="i18n" i18nKey="ccay.cms.commentConfig.email"></label>
	 	</span>
	</div>
</div>
</form>

<div class="codeArea">
<pre>
MailVO mail = new MailVO();
//测试得到邮箱
mail.setTo(new String[]{sampleMail.getTestEmail()});
//测试得到邮件模板,邮件模板可以通过下面的获取富文本获取到，点击进去把send_email_template拷贝到名字那里进行搜索
mail.setTemplateName("send_email_template");
Map<String,Serializable> bindItems = new HashMap<String,Serializable>();
 
//测试邮件内容
bindItems.put("emailContent", sampleMail.getEmailContent());
//测试邮件主题
bindItems.put("emailMotif", sampleMail.getEmailMotif());
//测试全部放到一起
mail.setBindItems(bindItems);
//测试发送邮箱
defaultMailService.sendMail(mail);
</pre>	
</div>